-- sneak
-- created by shuzy
-- 潜行，每翻开一块石板，属性+N，持续本层

return {
    apply = function(prop, baseValue)
        return baseValue + prop[3];
    end,

    -- 回合触发
    trigger = function(who, prop, arg)
        if who.type ~= OBJECT_TYPE_USER then
            return;
        end

        -- 取当前已累加的属性
        local condition = CombatStatusM.queryCondition(who, "sneak") or {};
        local value = condition["value"] or 0;

        -- 持续本层
        local newCondition = {
            ["attrib"] = prop[2],
            ["value"] = value + prop[3],
            ["end_round"] = prop[4],
        }

        -- 更新状态
        CombatStatusM.applyStatus(who, "sneak", newCondition);
    end,

    record = function(target, prop, path)
        return false;
    end
};